package com.xl.rentkeeper.business;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

import com.xl.rentkeeper.App;
import com.xl.rentkeeper.R;
import com.xl.rentkeeper.act.MainActivity;

/**
 * Created by Administrator on 2015/8/22.
 */
public class NotificationLogic extends BaseLogic{
    NotificationManager manager = null;
    public static NotificationLogic getInstance() {
        return (NotificationLogic) SingletonRegistry.getInstance(NotificationLogic.class);
    }
    private NotificationLogic(){
        manager = (NotificationManager) App.getApp().getSystemService(Context.NOTIFICATION_SERVICE);
    }
    public void ntfPeedOrder(int orderCount){
//        Notification notification = new Notification();
//        notification.icon = R.mipmap.ic_launcher;
//        notification.tickerText = "新的可接订单";
//        notification.flags |= Notification.FLAG_AUTO_CANCEL;
//        notification.when = System.currentTimeMillis();
//        Intent intent = new Intent(App.getApp(), MainActivity.class);
//        PendingIntent pIntent = PendingIntent.getActivity(App.getApp(), 0, intent, 0);
//        notification.setLatestEventInfo(App.getApp(), "接单提醒", "有"+orderCount+"个可接看房订单，快去接单吧!", pIntent);
//        manager.notify(1,notification);
    }

}
